<template>
    <div class="container">
        <!-- <h1>hello,word! 6666666</h1>
        <h3 v-show="blean">ing中......88888</h3>
         <div v-for="(item,index) in arr" :key="item">{{item.b}}--{{index}}</div>
        <div v-for="(item,index) in arr1" :key="item">{{item}}--{{index}}</div> -->
        <input @keyup.13="onEnter" type="text" v-model="message" value="">
        <p v-for="(item,index) in arr" :key="item" v-show="xianyin">{{item}}-{{index}}-----<button @click="del">×</button></p>
    </div>
</template>

 
<script>

    export default{
        data(){
            return{   
            //    arr:[{a:1,b:2},{a:"A",b:"B"},{c:"拿饭",b:"fg"}],
            //    arr1:[1,2,3]
            message:'',
            arr:[],
            xianyin:true,
           
            }
        },
        methods:{
             onEnter:function(){
              this.arr.push(this.message)
              console.log(this.index)
             },
            del:function(){
               this.arr.splice(index,1)
              }
      
            
        }
    }
</script>
